# add and remove nodes.
add.node(x, node)
remove.node(x, node)
# re-label nodes.
rename.nodes(x, names)
# S4 method for bn
nodes(object) <- value
# S4 method for bn.fit
nodes(object) <- value
Value
add.node(), remove.node() and rename.nodes() return an
updated bn object.
Arguments
x
an object of class bn for add.node() and
remove.node(); an object of class bn or bn.fit for
rename.nodes().
object
an object of class bn or bn.fit.
node
a character string, the label of a node.
value, names
a vector of character strings, the new set of labels
that wll be used as to rename the nodes.
Author
Marco Scutari
Details
add.node() adds a new (isolated) node to an existing bn object.
remove.node() removes a node from a bn object.
rename.nodes() replaces the node labels with new ones, relabelling the
whole node set. The assignment method for nodes() is an alias of
rename.nodes().